/*
package com.yenlien.traceyun.business.dao;

import com.yenlien.traceyun.business.entity.Message;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

*/
/**
 * Created by LiuSha on 2020/6/10.
 *//*

public interface MessageDao extends BaseJpaDao<Message> {
    Message findById(String id);

    @Query(value = "select COUNT(1) num  from t_message where user_id=?1 AND state = 0", nativeQuery = true)
    Integer findByCount(String userId);

    @Transactional
    @Modifying
    @Query("update Message m set m.state=1 where m.state=0 and m.userId=?1")
    void updateAllState(String user_id);
}
*/
